package com.bestow.lease.service.impl;

import java.util.List;
import com.bestow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestow.lease.mapper.HlsBpMasterMapper;
import com.bestow.lease.domain.HlsBpMaster;
import com.bestow.lease.service.IHlsBpMasterService;

/**
 * 商业伙伴信息Service业务层处理
 * 
 * @author liliu
 * @date 2022-09-26
 */
@Service
public class HlsBpMasterServiceImpl implements IHlsBpMasterService 
{
    @Autowired
    private HlsBpMasterMapper hlsBpMasterMapper;

    /**
     * 查询商业伙伴信息
     * 
     * @param bpId 商业伙伴信息主键
     * @return 商业伙伴信息
     */
    @Override
    public HlsBpMaster selectHlsBpMasterByBpId(Long bpId)
    {
        return hlsBpMasterMapper.selectHlsBpMasterByBpId(bpId);
    }

    /**
     * 查询商业伙伴信息列表
     * 
     * @param hlsBpMaster 商业伙伴信息
     * @return 商业伙伴信息
     */
    @Override
    public List<HlsBpMaster> selectHlsBpMasterList(HlsBpMaster hlsBpMaster)
    {
        return hlsBpMasterMapper.selectHlsBpMasterList(hlsBpMaster);
    }

    /**
     * 新增商业伙伴信息
     * 
     * @param hlsBpMaster 商业伙伴信息
     * @return 结果
     */
    @Override
    public int insertHlsBpMaster(HlsBpMaster hlsBpMaster)
    {
        hlsBpMaster.setCreateTime(DateUtils.getNowDate());
        return hlsBpMasterMapper.insertHlsBpMaster(hlsBpMaster);
    }

    /**
     * 修改商业伙伴信息
     * 
     * @param hlsBpMaster 商业伙伴信息
     * @return 结果
     */
    @Override
    public int updateHlsBpMaster(HlsBpMaster hlsBpMaster)
    {
        hlsBpMaster.setUpdateTime(DateUtils.getNowDate());
        return hlsBpMasterMapper.updateHlsBpMaster(hlsBpMaster);
    }

    /**
     * 批量删除商业伙伴信息
     * 
     * @param bpIds 需要删除的商业伙伴信息主键
     * @return 结果
     */
    @Override
    public int deleteHlsBpMasterByBpIds(Long[] bpIds)
    {
        return hlsBpMasterMapper.deleteHlsBpMasterByBpIds(bpIds);
    }

    /**
     * 删除商业伙伴信息信息
     * 
     * @param bpId 商业伙伴信息主键
     * @return 结果
     */
    @Override
    public int deleteHlsBpMasterByBpId(Long bpId)
    {
        return hlsBpMasterMapper.deleteHlsBpMasterByBpId(bpId);
    }
}
